package com.glsc.ngateway.platform.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.metadata.BaseRowModel;
import lombok.ToString;

import java.util.Objects;

/**
 * @author guoj
 * @description: 分摊数据导出dto
 * @date 2024/10/17 14:15
 */
@ToString(callSuper = true)
public class CostAllocationTaskExportDto extends BaseRowModel {
    @ColumnWidth(20)
    @ExcelProperty(value = "资产唯一标识", index = 0)
    private String itUniqueKey;      //资产唯一标识
    @ColumnWidth(20)
    @ExcelProperty(value = "分段起始日期", index = 1)
    private String sectionStartDate;    // 分段开始时间
    @ColumnWidth(20)
    @ExcelProperty(value = "分段结束日期", index = 2)
    private String sectionEndDate;     //分段结束时间



    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CostAllocationTaskExportDto penBean = (CostAllocationTaskExportDto) o;
        //当type、color 内容都相等的时候，才返回true
        return Objects.equals(itUniqueKey, penBean.itUniqueKey) &&
                Objects.equals(sectionStartDate, penBean.sectionStartDate)&&
                Objects.equals(sectionEndDate, penBean.sectionEndDate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(itUniqueKey, sectionStartDate,sectionEndDate);
    }


    public String getItUniqueKey() {
        return itUniqueKey;
    }

    public void setItUniqueKey(String itUniqueKey) {
        this.itUniqueKey = itUniqueKey;
    }

    public String getSectionStartDate() {
        return sectionStartDate;
    }

    public void setSectionStartDate(String sectionStartDate) {
        this.sectionStartDate = sectionStartDate;
    }

    public String getSectionEndDate() {
        return sectionEndDate;
    }

    public void setSectionEndDate(String sectionEndDate) {
        this.sectionEndDate = sectionEndDate;
    }
}
